<div id="result">
<?php echo $this->Session->flash(); ?>
<h5>Edit <?php echo $this->data['Paymentmethod']['methodname'];?> Configuration.</h5>
<form method="post" id="add_category" action="<?php echo Configure::read('base_url')."paymentmethods/editsadmin/".$this->data['Paymentmethod']['id'];?>">
<table cellspacing="0" id="mytable">
          <tbody>
          <tr>
            <td colspan="2">
				<table width="100%" border="0" cellspacing="0" cellpadding="0">
					<tr>
						<td align="right"><br />E-mail :</td>
						<td  align="left" width="144"><br />
							<input type="hidden" name="data[id]" value="<?php echo $this->data['Paymentmethod']['id'];?>" />
							<?php echo $this->Form->input('email',array('label'=>false,'size'=>50,'class'=>"required",'value'=>$this->data['Paymentmethod']['email'], 'title'=>"E-mail can not empty."));?>
						</td>
					</tr>	
					<?php if($this->data['Paymentmethod']['methodname']=="Google Checkout"){?>
					 <tr>
						<td align="right"><br />Merchant ID/User :</td>	
						<td  align="left"><br />
								<?php echo $this->Form->input('apiuser',array('label'=>false,'size'=>50,'class'=>"required",'value'=>$this->data['Paymentmethod']['apiuser'], 'title'=>"API User can not empty."));?>			
						</td>		
					</tr>
					<tr>					
						<td align="right"><br />Merchant Signature :</td>	
						<td align="left"><br />
								<?php echo $this->Form->input('apisigniture',array('label'=>false,'size'=>50,'class'=>"required",'value'=>$this->data['Paymentmethod']['apisigniture'], 'title'=>"API Password can not empty."));?>
						</td>		
					</tr>
					<?php }?>
					<!--tr>					
						<td align="right"><br />Merchant Password :</td>	
						<td align="left"><br />
								<?php echo $this->Form->input('apipass',array('label'=>false,'size'=>50,'class'=>"required",'value'=>$this->data['Paymentmethod']['apipass'], 'title'=>"API Password can not empty."));?>
						</td>		
					</tr-->
					<tr>						
						<td align="right"><br />Status :</td>	
						<td align="left"><br />
							<?php
								$options=array('live'=>'live','demo'=>'demo');
								echo $this->Form->select('state',$options,array('selected'=>$this->data['Paymentmethod']['state']),array('empty'=>false));
							?>
						</td>	
					</tr>
				   <tr> 
						<td align="right"></td>
						<td align="left" width="347"><br /><input type="submit" style="background:#73AE0B; color:#fff; font-size:14px;" name="button" id="button" value="Submit" /></td>    
				   </tr></table></td>
				</tr>
        </tbody></table>
</form>
</div>
<?php  echo $html->script(array("jquery.min.js","jquery.form.js","jquery.validate.js")); ?>
 <script type="text/javascript">
 jQuery(document).ready(function(){
 
		var v = jQuery("#add_category").validate({
			submitHandler: function(form) {
				jQuery(form).ajaxSubmit({
					target: "#result"
				});
			}
		});

	});
 </script>